# 主要学习 多线程
from threading import Thread


def func(name):
    for i in range(1, 100):
        print(name + "--func--->" + str(i) + "\n")


if __name__ == '__main__':
    # 多进程 就是把 Thread 换成 Process
    t1 = Thread(target=func, args=("t1",))  # 传参必须是 元组
    t1.start()

    t2 = Thread(target=func, args=("t2",))  # * t1 后面的*逗号*不能少
    t2.start()

    for i in range(1, 100):
        print("main---------->" + str(i) + "\n")
